package org.asociacion.backend.bo;

import java.util.Date;

import org.asociacion.backend.persistence.entities.TblUser;

public class UserBo {

	private Integer id;
	private String firstName;
	private String lastName;
	private String nickName;
	private String email;
	private String urlImage;
	private String password;
	private CityBo cityBo;
	private Boolean status;
	private Date created;
	private Date lastMovement;
	private EnumSex sex;
	
	public UserBo() {
		
	}
	
	public UserBo(TblUser tblUser) {
		id = tblUser.getId();
		this.firstName = tblUser.getFirstName();
		this.lastName = tblUser.getLastName();
		this.nickName = tblUser.getNickName();
		this.email = tblUser.getEmail();
		this.urlImage = tblUser.getUrlImage();
		this.password = tblUser.getPassword();
		this.cityBo = new CityBo(tblUser.getTblCity());
		this.status = tblUser.getStatus();
		this.created  = tblUser.getCreated();
		this.lastMovement = tblUser.getLastMovement();
		this.sex = tblUser.getSex();
	}
	
	@Override
	public String toString() {
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append("id: ").append(id).append(" firstname: ").append(firstName).append(" lastname: ").append(lastName)
			.append(" nickname: ").append(nickName).append(" email: ").append(email).append(" sex: ").append(sex)
			.append(" city: ").append(cityBo.getName()).append(" state: ").append(cityBo.getState());
		return stringBuilder.toString();
	}
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getUrlImage() {
		return urlImage;
	}
	public void setUrlImage(String urlImage) {
		this.urlImage = urlImage;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}
	public Date getLastMovement() {
		return lastMovement;
	}
	public void setLastMovement(Date lastMovement) {
		this.lastMovement = lastMovement;
	}
	public EnumSex getSex() {
		return sex;
	}
	public void setSex(EnumSex sex) {
		this.sex = sex;
	}

	public CityBo getCityBo() {
		return cityBo;
	}

	public void setCityBo(CityBo cityBo) {
		this.cityBo = cityBo;
	}		

}
